﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Snowdreamist.ComponentModel
{
    public abstract class ThreadCriticalRegion : IDisposable
    {
        public ThreadCriticalRegion()
        {
            this.Enter();
        }

        public void Dispose()
        {
            this.Exit();
        }

        public abstract void Enter();
        public abstract void Exit();
    }
}
